package com.example.my_flea_street.service.impl;

import com.example.my_flea_street.Mapper.AdministratorMapper;
import com.example.my_flea_street.bean.Notice;
import com.example.my_flea_street.bean.ReportedInfo;
import com.example.my_flea_street.bean.ReportedUser;
import com.example.my_flea_street.bean.SearchUser;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service(value = "administratorService")
public class AdministratorService {

    @Resource
    AdministratorMapper mapper;

    public void postNotice(String time,String text){
        mapper.postNotice(time,text);
    }

    public Page<ReportedUser> getInfo() {
        return mapper.getInfo();
    }

    public void banUser(int user_id,int isBanded) {
        mapper.banUser(user_id,isBanded);
    }

    public void cancel(int id) {
        mapper.cancel(id);
    }

    public Page<ReportedInfo> getReportedInfo() {
        return mapper.getReportedInfo();
    }

    public void deleteInfo(int info_id) {
        mapper.deleteInfo(info_id);
    }

    public String getPic(int info_id) {
       return mapper.getPic(info_id);
    }

    public void cancelInfo(int id) {
        mapper.cancelInfo(id);
    }

    public Page<SearchUser> getBandedUser() {
        return mapper.getBandedUser();
    }
}
